package geektime.spring.hello.hellospring.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import geektime.spring.hello.hellospring.dao.UserDao;
import geektime.spring.hello.hellospring.entity.User;

@Service
public class UserService {
	@Autowired
	private UserDao dao;
	
	public void addUser(User user) {
		dao.insert(user);
	}

	public IPage<User> queryAll(Page<User> page) {
		return dao.selectPageVo(page);
	}
	

}

